package com.atguigu.mybatiplus.controller;

import com.atguigu.mybatiplus.pojo.entity.User;
import com.atguigu.mybatiplus.service.UserService;
import org.springframework.web.bind.annotation.CrossOrigin;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RestController;

import javax.annotation.Resource;
import java.util.List;

@RestController
@CrossOrigin
public class UserController {
    @Resource
    private UserService userService;
    @RequestMapping("/user/list")
    public List<User> list(){
        List<User> list = userService.list();
        return list;
    }
}
